<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<script type="text/javascript">
    function page(n, s) {
        $("#pageNo").val(n);
        $("#pageSize").val(s);
        $("#searchForm").submit();
        return false;
    }
</script>
<div class="content-wrap">
    <div class="wrapper" style="bottom: 50px;">
        <ul class="nav nav-tabs">
            <li class="active">
                <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/orders/drugDispRec/index')">摆药记录列表</a>
            </li>
            <li>
                <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/orders/drugDispRec/form')">摆药记录添加</a>
            </li>
        </ul>
        <section class="panel panel-default">
            <div class="panel-body">
                <div class="table-responsive no-border">
                    <div class="datatable-top">
                        <div class="pull-left">
                            <form:form id="searchForm" modelAttribute="drugDispRec"
                                       onsubmit="return loadDivForm('mainCenterDiv','searchFormDict','${ctx}/orders/drugDispRec/index');"
                                       method="post" class="form-inline">
                                <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                <ul class="ul-form">
                                    <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit"
                                                            value="查询"/></li>
                                    <li class="clearfix"></li>
                                </ul>
                            </form:form>
                        </div>
                    </div>
                    <table id="contentTable" class="table table-bordered table-striped mg-t datatable">
                        <thead>
                        <tr>
                            <th>主键</th>
                            <th>患者姓名</th>
                            <th>药房名称</th>
                            <th>医嘱名称</th>
                            <th>药品规格</th>
                            <th>药品单位</th>
                            <th>摆药数量</th>
                            <th>药品厂商</th>
                            <th>金额</th>
                            <th>所在病区</th>
                            <th>病人Id</th>
                            <th>住院Id</th>
                            <th>药品编码</th>
                            <th>机构ID</th>
                            <th>标志</th>
                            <th>创建人</th>
                            <th>创建时间</th>
                            <th>更新人</th>
                            <th>更新时间</th>
                            <th>备注信息</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${page.list}" var="drugDispRec">
                        <tr>
                            <td> ${drugDispRec.id}</td>
                            <td> ${drugDispRec.name}</td>
                            <td> ${drugDispRec.storageName}</td>
                            <td> ${drugDispRec.orderText}</td>
                            <td> ${drugDispRec.drugSpec}</td>
                            <td> ${drugDispRec.drugUnits}</td>
                            <td> ${drugDispRec.amount}</td>
                            <td> ${drugDispRec.firmName}</td>
                            <td> ${drugDispRec.costs}</td>
                            <td> ${drugDispRec.wardCode}</td>
                            <td> ${drugDispRec.patientId}</td>
                            <td> ${drugDispRec.visitId}</td>
                            <td> ${drugDispRec.drugCode}</td>
                            <td> ${drugDispRec.orgId}</td>
                            <td> ${drugDispRec.delFlag}</td>
                            <td> ${drugDispRec.createBy.id}</td>
                            <td> ${drugDispRec.createDate}</td>
                            <td> ${drugDispRec.updateBy.id}</td>
                            <td> ${drugDispRec.updateDate}</td>
                            <td> ${drugDispRec.remarks}</td>
                            <td>
                                <a href="#"
                                   onclick="loadDiv('mainCenterDiv','${ctx}/orders/drugDispRec/form?id=${drugDispRec.id}')"
                                   class="btn btn-success btn-xs">修改</a>
                                <a href="#" class="applyBt btn btn-danger btn-xs"
                                   onclick="confirmExtend('确认要删除该摆药记录吗？',function(){delLoad('mainCenterDiv','${ctx}/orders/drugDispRec/delete?id=${drugDispRec.id}','${ctx}/sys/dict/index')})">删除</a>
                            </td>
                        </tr>
                        </c:forEach>

                    </table>
                    <div class="pagination">${page}</div>
                </div>
            </div>
        </section>
    </div>
</div>